<template>
  <div class="product">
    <el-carousel>
      <el-carousel-item v-for="item in bannerList">
        <img :src="item.imgUrl" alt="" />
      </el-carousel-item>
    </el-carousel>
    <div class="content">
      <div class="title flex-center">氢易能源系列产品</div>
      <div class="desc flex-center">适用于不同氢能系统的标准化或定制化产品</div>
      <div class="product-list">
        <div class="item animated" v-for="item in productList">
          <div class="info">
            <div class="item-title">{{ item.title }}</div>
            <div class="item-zhaiyao">{{ item.zhaiyao }}</div>
            <div class="item-intro">{{ item.content }}</div>
          </div>
          <div class="item-bg">
            <img :src="item.imgUrl" alt="" />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { $http } from '@/service/request/index'

const bannerList = ref([])
const productList = ref([])

const getBanner = async () => {
  const { data } = (await $http('queryBannerList', {})) as any
  bannerList.value = data
}
const getProduct = async () => {
  const { data } = (await $http('queryProductList', {})) as any
  productList.value = data
}
const init = async () => {
  getBanner()
  getProduct()
}
init()
</script>

<style lang="scss" scoped>
@import './styles/common.scss';
@import './styles/web.scss';
@import './styles/phone.scss';
</style>
